<template>
  <editmodel :options="options" :id="route.query.id"></editmodel>
</template>

<script lang="ts" setup>
import { ref, reactive, onMounted } from "vue";
import { useRoute } from "vue-router";
import editmodel from "../editModel/index.vue";
import { dataSourceType } from "@/type";
//data
const route = useRoute();

const options = reactive({
  message: "A组只能往B组拖到一个元素",
  group: {
    name: "itxst",
    put: false, //允许拖入
    pull: "clone",
  },
  componentList: [
    {
      type: "exclusive",
      header: "专属组件",
      list: [
        { name: '手机号', icon: 'icon-mobile', componentName: 'phone', uniqe: true },
        { name: '邮箱', icon: 'icon-a-mailbox1', componentName: 'email', uniqe: true },
        { name: '性别', icon: 'icon-gender', componentName: 'sex', uniqe: true },
        { name: '座机号', icon: 'icon-landline', componentName: 'fixPhone', uniqe: true },
        { name: '真实姓名', icon: 'icon-introduction', componentName: 'realName', uniqe: true },
        { name: '生日', icon: 'icon-birthday', componentName: 'birthday', uniqe: true },
        { name: '年龄', icon: 'icon-name', componentName: 'age', uniqe: true },
        { name: '身份证号', icon: 'icon-a-Idnumber', componentName: 'identity', uniqe: true },
        { name: '详细地址', icon: 'icon-a-Fulladdress1', componentName: 'address', uniqe: true },
      ],
    },
    {
      type: "currency",
      header: "通用组件",
      list: [
        { name: "单行文本", icon: "icon-a-singlelineinput", componentName: "input", isShowScene: true },
        { name: "多行文本", icon: "icon-a-multilineinput", componentName: "textArea", isShowScene: true },
        { name: "单选框", icon: "icon-a-Singleoption", componentName: "radio", isShowScene: true },
        { name: "多选框", icon: "icon-a-Multipleselection", componentName: "checkbox", isShowScene: true },
        { name: "下拉选框", icon: "icon-a-dropdownbox", componentName: "dropdownbox", isShowScene: true },
        { name: "级联选择", icon: "icon-a-dropdownbox", componentName: "dropdownbox", isShowScene: true },
        { name: "时间日期", icon: "icon-calendar", componentName: "dateTime", isShowScene: true },
        { name: "验证码", icon: "icon-calendar", componentName: "dateTime", isShowScene: true },
        { name: "日期时间", icon: "icon-calendar", componentName: "dateTime", isShowScene: true },
        {
          name: "单图上传",
          icon: "icon-a-Singleimageupload",
          componentName: "singleImgUpload",
          isShowScene: true,
          isRightAble: false,
        },
        {
          name: "多图上传",
          icon: "icon-a-Multiimageupload",
          componentName: "multiImgUpload",
        },
        { name: "视频上传", icon: "icon-a-Videouploading", componentName: "videoUpload" },
        { name: "音频上传", icon: "icon-a-Audiouploading", componentName: "audioUpload" },
        { name: "附件上传", icon: "icon-attachment", componentName: "enclosureUpload" },
        {
          name: "单图上传",
          icon: "icon-a-Singleimageupload",
          componentName: "singleImgUpload",
          isShowScene: true,
          isRightAble: false,
        },
        {
          name: "多图上传",
          icon: "icon-a-Multiimageupload",
          componentName: "multiImgUpload",
        },
        {
          name: "多项填空",
          icon: "icon-a-Multiimageupload",
          componentName: "multiImgUpload",
        },
      ],
    },
    {
      type: "layout",
      header: "布局组件",
      list: [
        { name: '分割线', icon: 'icon-mobile', componentName: 'phone', uniqe: true },
        { name: '文本描述', icon: 'icon-a-mailbox1', componentName: 'email', uniqe: true },
      ],
    },
  ],
});
</script>

<style lang="less" scoped></style>
